import request from '@/utils/request'

export function categoryTreeData(query) {
  return request({
    url: `${process.env.VUE_APP_MODULE_MALL_API}/api/mall/category/treeData`,
    method: 'post',
    data: query
  })
}

export function categoryLoad(query) {
  return request({
    url: `${process.env.VUE_APP_MODULE_MALL_API}/api/mall/category/load`,
    method: 'get',
    params: query
  })
}

export function categorySave(query) {
  return request({
    url: `${process.env.VUE_APP_MODULE_MALL_API}/api/mall/category/save`,
    method: 'post',
    data: query
  })
}

export function categoryDelete(query) {
  return request({
    url: `${process.env.VUE_APP_MODULE_MALL_API}/api/mall/category/delete`,
    method: 'post',
    data: query
  })
}
